package models;

import java.math.BigInteger;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import play.db.jpa.Model;
@Entity
@Table(name="operacao")
public class Operacao extends Model {

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="data_final")
	public Date dataFinal;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="data_inicial")
	public Date dataInicial;

	@Lob @Basic(fetch=FetchType.LAZY) 
	@Column(length = 5242880)
	public byte[] logomarca;
	@Column(nullable = false)
	@Basic(optional = false)
	public String nome;

	@Column(name="nome_arquivo_plano_de_operacao")
	public String nomeArquivoPlanoDeOperacao;

	@Column(name="nome_arquivo_relatorio_de_operacao")
	public String nomeArquivoRelatorioDeOperacao;

	@Lob @Basic(fetch=FetchType.LAZY) 
	public String objetivo;

	@Lob @Basic(fetch=FetchType.LAZY) 
	public String observacao;

	@Lob @Basic(fetch=FetchType.LAZY) 
	@Column(name="organizacoes_envolvidas")
	public String organizacoesEnvolvidas;

	@Lob @Basic(fetch=FetchType.LAZY) 
	@Column(name="outras_informacoes")
	public String outrasInformacoes;

	@Lob @Basic(fetch=FetchType.LAZY) 
	@Column(length = 5242880, name="plano_de_operacao")
	public byte[] planoDeOperacao;

	@Lob @Basic(fetch=FetchType.LAZY) 
	@Column(length = 5242880, name="relatorio_de_operacao")
	public byte[] relatorioDeOperacao;

	public BigInteger version;

}
